<template>
  <div>
    <el-drawer title="详情" size="800px" :visible.sync="isShowModal">
      <div class="mb20">
        <span class="property-title">抖音发布</span>
      </div>
      <el-form label-suffix="：" label-width="120px">
        <el-form-item label="发布账号">
          <span>{{ detail.publishNickName }}</span>
        </el-form-item>
        <el-form-item label="视频来源">
          <span>{{ detail.videoFrom == '0' ? '上传视频' : '精彩视频' }}</span>
        </el-form-item>
        <el-form-item label="已选视频">
          <video style="width: 200px;" controls :src="detail.videoPath" />
        </el-form-item>
        <el-form-item label="视频封面">
          <img style="width: 40px;" :src="detail.videoCover" alt="">
        </el-form-item>
        <el-form-item label="视频标题">
          <span>{{ detail.videoTitle }}</span>
        </el-form-item>
        <el-form-item label="视频话题">
          <span>{{ detail.dyVideoTopic }}</span>
        </el-form-item>
        <el-form-item label="计划任务">
          <span>{{ detail.planName }}</span>
        </el-form-item>
        <el-form-item label="发布时间">
          <span>{{ detail.publishTime }}</span>
        </el-form-item>
        <div v-if="detail.mountType == '0' || detail.mountType == '1'" class="mb20">
          <span class="property-title">挂载设置</span>
        </div>

        <el-form-item v-if="detail.mountType == '0' || detail.mountType == '1'" label="挂载类型">
          <span>{{ detail.mountType == '0' ? 'POI门店地址' : '抖音小程序' }}</span>
        </el-form-item>
        <template v-if="detail.mountType == '0'">
          <el-form-item label="门店地址">
            <span>{{ detail.address }}</span>
          </el-form-item>
        </template>
        <template v-if="detail.mountType == '1'">
          <el-form-item label="小程序标题">
            <span>{{ detail.dyMpTitle }}</span>
          </el-form-item>
          <el-form-item label="小程序APPID">
            <span>{{ detail.dyMpAppId }}</span>
          </el-form-item>
          <el-form-item label="小程序PATH">
            <span>{{ detail.dyMpPath }}</span>
          </el-form-item>
        </template>
      </el-form>
    </el-drawer>
  </div>
</template>

<script>
import {
  DyPublishDetail
} from '@/api'
export default {
  data() {
    return {
      detail: {},
      isShowModal: false
    }
  },
  methods: {
    getDetail(id) {
      DyPublishDetail({ param: { id }}).then(res => {
        if (res.errorCode !== '000000') return
        this.detail = res.record
      })
    }
  }
}
</script>

<style lang="scss" scoped>
</style>
